import fetch from '../config/fetch'
import { path  } from '../config/env'

export default {
  // 获取直播分类列表
  getBroadcastCategory: (params: any) => fetch(path + '/category_s', params, 'GET'),

  // 获取直播频道列表
  getChannelData: (params: any) => fetch(path + '/channel_s', params, 'GET'),

  // 提交修改(频道名称,分类路径等)
  updateCategoryData: (params: any) => fetch(path + '/rpc/channel_category_manage', params, 'POST'),

  // 获取直播分类频道关系
  getCategoryChannel: (params: any) => fetch(path + '/category_channel_mapping_s', params, 'GET'),

  // 获取点播结点列表
  getNodeData: (params: any) => fetch(path + '/vod_trans_node', params, 'GET'),

  // 注入一个点播资源
  createNodeResource: (params: any) => fetch(path + '/vodcms_vod_import', params, 'POST'),

  // 上线一个点播资源
  onlineNodeResource: (params: any) => fetch(path + '/vodcms_vod_online', params, 'POST'),

  // 下线一个点播资源
  offlineNodeResource: (params: any) => fetch(path + '/vodcms_vod_offline', params, 'POST'),

  // 撤销一个点播资源
  clearNodeResource: (params: any) => fetch(path + '/vodcms_vod_repeal', params, 'POST'),
}